function SetVersion(coreRoot, major,minor,patch,build, phase, productName)

    -- xmake 最小版本号
    set_xmakever("2.2.5")

    -- 设置资源文件模板
    add_configfiles(coreRoot.."/include/vrtsVersion/version.rc.in")
    local cfgdir = "."
    add_files(cfgdir.."/version.rc")
    set_configdir(cfgdir)

    -- 设置自定义变量 VAR_VER_PHASE，VAR_VER_PHASE
    set_configvar("VAR_VER_PHASE",phase)
    set_configvar("VAR_VER_PRODUCT_NAME", productName)

    -- 设置内建变量：VERSION_MAJOR,VERSION_MINOR,VERSION_ALTER,VERSION_BUILD
    -- set_version(major.."."..minor.."."..patch,{build="%y%m%d%H%M"})
    set_version(major.."."..minor.."."..patch,{build=build})
end